package com.grahamedgecombe.jterminal;

import javax.swing.*;
import java.awt.*;

public class StarterDemo {

    public static void main(String[] args) {
        JFrame frame = new JFrame();
        MyDrawPanel panel = new MyDrawPanel();
        JLabel label = new JLabel("aaa");
        panel.setBackground(Color.blue);
        panel.add(label);
        frame.getContentPane().add(panel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 300);
        frame.setVisible(true);
    }

    static class MyDrawPanel extends JPanel {
        @Override
        public void paint(Graphics g) {
            super.paint(g);
            g.setColor(Color.orange);
            g.fillRect(20, 50, 100, 100);
        }
    }


}
